<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style>
    table, th, td {
        border: 1px solid black;
        border-collapse: collapse;
    }
    th, td {
        padding: 8px;
        text-align: left;
    }
</style>
</head>
<body>
<f:view>
	<h2>费用分析报表</h2>
	<a class="button" href="http://localhost:8080/report1">返回</a>
	
	<table>
	    <tr>
	        <th>订单编号</th>
	        <th>供应商ID</th>
	        <th>商品名称</th>
	        <th>数量</th>
	        <th>单价</th>
	        <th>总价</th>
	        <th>其他费用</th>
	        <th>总费用</th>
	    </tr>
	    <!-- 以下是表格数据行，这里只是示例数据，实际中你可能需要从后端获取 -->
	    <!-- <tr>
	        <td>订单编号001</td>
	        <td>供应商ID001</td>
	        <td>商品1</td>
	        <td>10</td>
	        <td>100.00</td>
	        <td>1000.00</td>
	        <td>0.00</td>
	        <td>1000.0</td>
	    </tr> -->
	    <!-- 你可以继续添加更多订单数据 -->
	    <c:forEach items="${costAnalyses}" var="costAnalysis">
		    <tr>
		        <td>${costAnalysis.id}</td>
		        <td>${costAnalysis.supplierId}</td>
		        <td>${costAnalysis.productName}</td>
		        <td>${costAnalysis.quantity}</td>
		        <td>${costAnalysis.unitPrice}</td>
		        <td>${costAnalysis.totalPrice}</td>
		        <td>${costAnalysis.otherFees}</td>
		        <td>${costAnalysis.totalCost}</td>
		    </tr>
		</c:forEach>
	    
	</table>
	
	
</f:view>
</body>
</html>